package com.example.springbootwebsocketmonikehuduan;

import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @program: springboot-websocket-monikehuduan
 * @description: 门禁控制contrller
 * @author: XianJin.Lu
 * @create: 2021-09-15 14:38
 **/

@RestController
public class Controller {

    @RequestMapping("/mengjing/{userId}")
    public void control( @PathVariable("userId")  String devId ){
        System.out.println(devId);

        String  s3=   "{'head':{'cmdType':4,'cmdSn':'0002'},'data':{'devId':"+devId+",'open':0,'doorIndex':0}}";

        WebsocketClient333 websocketClient333 = new WebsocketClient333(s3);

        websocketClient333.find2();

    }

}
